{template 'common/header'}
<script src="{MODULE_URL}template/js/galleria.js"></script>
<style type="text/css">
    #galleria img{
   display: block; position: relative; left: 50px; top: 30px;
   height: 0px;
   width: 0px;
}
</style>
<div class="panel panel-default" id='list'>
  <div class="panel-heading">
    <h3 class="panel-title">商品详情</h3>
  </div>
  <div class="panel-body">
     <p>{$item['description']}</p>
     <p>
     	{loop $imgs $value}
                <img src="{$value['src']}" style="width: 60px; height: 60px;border:1px solid white;float:left;" />
        {/loop}

     </p>
  </div>
  <ul class="list-group">
    <li class="list-group-item">商品标题：{$item['title']}</li>
    <li class="list-group-item">商品价格：{$item['zprice']}</li>
    <li class="list-group-item">联系人：{$item['realname']}</li>
    <li class="list-group-item">联系电话：{$item['mobile']}</li>
    <li class="list-group-item">发布时间：{php echo date('Y-m-d H:i:s', $item['createtime']);}</li>
  </ul>
</div>
<div id="galleria"></div>
    <script>
    // Load theme
    Galleria.loadTheme('{MODULE_URL}template/lightbox/galleria.lightbox.js');

    $('#galleria').galleria({
        data_source: '#list',
        extend: function() {
            this.bind(Galleria.LOADFINISH, function(e) {
                $(e.imageTarget).click(this.proxy(function(e) {
                    e.preventDefault();
                    this.next();
                }))
            })
        },
        keep_source: true,
        data_config: function(img) {
            return {
                description: $(img).next('.caption').html()
            }
        }
    });
</script>


{template 'common/footer'}